Qwen Code
Qwen Code is Qwen's open-source command-line AI coding workflow tool. Official site: qwen.ai/qwencode
1.1 Usage
Method 1: Config File
Set your HPC-AI key in the shell:
export HPC_AI_API_KEY="your-hpc-ai-api-key"
Configure ~/.qwen/settings.json:
{
"modelProviders": {
"openai": [
{
"id": "minimax/minimax-m2.5",
"name": "HPC-AI Minimax M2.5",
"envKey": "HPC_AI_API_KEY",
"baseUrl": "https://api.hpc-ai.com/inference/v1",
"generationConfig": {
"timeout": 120000,
"maxRetries": 2,
"samplingParams": {
"temperature": 0.2,
"max_tokens": 8192
}
}
}
]
},
"security": {
"auth": {
"selectedType": "openai"
}
},
"model": {
"name": "minimax/minimax-m2.5"
}
}
Then start Qwen Code:
qwen
Method 2: Runtime Flags
Use runtime flags for a quick test before writing a persistent config:
export HPC_AI_API_KEY="your-hpc-ai-api-key"
qwen --auth-type openai \
--model minimax/minimax-m2.5 \
--openaiApiKey "$HPC_AI_API_KEY" \
--openaiBaseUrl https://api.hpc-ai.com/inference/v1